import request from "@/utils/request"
import { SecondCategoryResponseDataData, More } from "./model/youshengshuModel"


// 定义请求地址的枚举
enum Api {
    getSecondCategoeyList = "/m-revision/page/index/queryIndexCategoryTabContent",
    getMore = "/m-revision/page/index/queryCategoryFeed"
}

// 1、请求二级分类列表
// request.get<any, secondCategoryResponse>
export const getSecondCategoeyListApi = (moduleKey: string) => {
    return request.get<any, SecondCategoryResponseDataData>(Api.getSecondCategoeyList, {
        params: {
            moduleKey
        }
    })
}

// 2、获取更多推荐
export const getMoreApi = (moduleKey: string) => {
    return request.get<any, More>(Api.getMore, {
        params: {
            moduleKey
        }
    })
}
